{"ast":null,"code":"import _slicedToArray from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_useForkRef as useForkRef, unstable_useIsFocusVisible as useIsFocusVisible } from '@mui/utils';\nimport extractEventHandlers from '../utils/extractEventHandlers';\nexport default function useButton(parameters) {\n  var _parameters$disabled = parameters.disabled,\n    disabled = _parameters$disabled === void 0 ? false : _parameters$disabled,\n    focusableWhenDisabled = parameters.focusableWhenDisabled,\n    href = parameters.href,\n    externalRef = parameters.ref,\n    tabIndex = parameters.tabIndex,\n    to = parameters.to,\n    type = parameters.type;\n  var buttonRef = React.useRef();\n  var _React$useState = React.useState(false),\n    _React$useState2 = _slicedToArray(_React$useState, 2),\n    active = _React$useState2[0],\n    setActive = _React$useState2[1];\n  var _useIsFocusVisible = useIsFocusVisible(),\n    isFocusVisibleRef = _useIsFocusVisible.isFocusVisibleRef,\n    handleFocusVisible = _useIsFocusVisible.onFocus,\n    handleBlurVisible = _useIsFocusVisible.onBlur,\n    focusVisibleRef = _useIsFocusVisible.ref;\n  var _React$useState3 = React.useState(false),\n    _React$useState4 = _slicedToArray(_React$useState3, 2),\n    focusVisible = _React$useState4[0],\n    setFocusVisible = _React$useState4[1];\n  if (disabled && !focusableWhenDisabled && focusVisible) {\n    setFocusVisible(false);\n  }\n  React.useEffect(function () {\n    isFocusVisibleRef.current = focusVisible;\n  }, [focusVisible, isFocusVisibleRef]);\n  var _React$useState5 = React.useState(''),\n    _React$useState6 = _slicedToArray(_React$useState5, 2),\n    hostElementName = _React$useState6[0],\n    setHostElementName = _React$useState6[1];\n  var createHandleMouseLeave = function createHandleMouseLeave(otherHandlers) {\n    return function (event) {\n      var _otherHandlers$onMous;\n      if (focusVisible) {\n        event.preventDefault();\n      }\n      (_otherHandlers$onMous = otherHandlers.onMouseLeave) == null ? void 0 : _otherHandlers$onMous.call(otherHandlers, event);\n    };\n  };\n  var createHandleBlur = function createHandleBlur(otherHandlers) {\n    return function (event) {\n      var _otherHandlers$onBlur;\n      handleBlurVisible(event);\n      if (isFocusVisibleRef.current === false) {\n        setFocusVisible(false);\n      }\n      (_otherHandlers$onBlur = otherHandlers.onBlur) == null ? void 0 : _otherHandlers$onBlur.call(otherHandlers, event);\n    };\n  };\n  var createHandleFocus = function createHandleFocus(otherHandlers) {\n    return function (event) {\n      var _otherHandlers$onFocu2;\n\n      // Fix for https://github.com/facebook/react/issues/7769\n      if (!buttonRef.current) {\n        buttonRef.current = event.currentTarget;\n      }\n      handleFocusVisible(event);\n      if (isFocusVisibleRef.current === true) {\n        var _otherHandlers$onFocu;\n        setFocusVisible(true);\n        (_otherHandlers$onFocu = otherHandlers.onFocusVisible) == null ? void 0 : _otherHandlers$onFocu.call(otherHandlers, event);\n      }\n      (_otherHandlers$onFocu2 = otherHandlers.onFocus) == null ? void 0 : _otherHandlers$onFocu2.call(otherHandlers, event);\n    };\n  };\n  var isNativeButton = function isNativeButton() {\n    var button = buttonRef.current;\n    return hostElementName === 'BUTTON' || hostElementName === 'INPUT' && ['button', 'submit', 'reset'].includes(button == null ? void 0 : button.type) || hostElementName === 'A' && (button == null ? void 0 : button.href);\n  };\n  var createHandleClick = function createHandleClick(otherHandlers) {\n    return function (event) {\n      if (!disabled) {\n        var _otherHandlers$onClic;\n        (_otherHandlers$onClic = otherHandlers.onClick) == null ? void 0 : _otherHandlers$onClic.call(otherHandlers, event);\n      }\n    };\n  };\n  var createHandleMouseDown = function createHandleMouseDown(otherHandlers) {\n    return function (event) {\n      var _otherHandlers$onMous2;\n      if (event.target === event.currentTarget && !disabled) {\n        setActive(true);\n      }\n      (_otherHandlers$onMous2 = otherHandlers.onMouseDown) == null ? void 0 : _otherHandlers$onMous2.call(otherHandlers, event);\n    };\n  };\n  var createHandleMouseUp = function createHandleMouseUp(otherHandlers) {\n    return function (event) {\n      var _otherHandlers$onMous3;\n      if (event.target === event.currentTarget) {\n        setActive(false);\n      }\n      (_otherHandlers$onMous3 = otherHandlers.onMouseUp) == null ? void 0 : _otherHandlers$onMous3.call(otherHandlers, event);\n    };\n  };\n  var createHandleKeyDown = function createHandleKeyDown(otherHandlers) {\n    return function (event) {\n      var _otherHandlers$onKeyD;\n      (_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null ? void 0 : _otherHandlers$onKeyD.call(otherHandlers, event);\n      if (event.defaultPrevented) {\n        return;\n      }\n      if (event.target === event.currentTarget && !isNativeButton() && event.key === ' ') {\n        event.preventDefault();\n      }\n      if (event.target === event.currentTarget && event.key === ' ' && !disabled) {\n        setActive(true);\n      } // Keyboard accessibility for non interactive elements\n\n      if (event.target === event.currentTarget && !isNativeButton() && event.key === 'Enter' && !disabled) {\n        var _otherHandlers$onClic2;\n        (_otherHandlers$onClic2 = otherHandlers.onClick) == null ? void 0 : _otherHandlers$onClic2.call(otherHandlers, event);\n        event.preventDefault();\n      }\n    };\n  };\n  var createHandleKeyUp = function createHandleKeyUp(otherHandlers) {\n    return function (event) {\n      var _otherHandlers$onKeyU;\n\n      // calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed\n      // https://codesandbox.io/s/button-keyup-preventdefault-dn7f0\n      if (event.target === event.currentTarget) {\n        setActive(false);\n      }\n      (_otherHandlers$onKeyU = otherHandlers.onKeyUp) == null ? void 0 : _otherHandlers$onKeyU.call(otherHandlers, event); // Keyboard accessibility for non interactive elements\n\n      if (event.target === event.currentTarget && !isNativeButton() && !disabled && event.key === ' ' && !event.defaultPrevented) {\n        var _otherHandlers$onClic3;\n        (_otherHandlers$onClic3 = otherHandlers.onClick) == null ? void 0 : _otherHandlers$onClic3.call(otherHandlers, event);\n      }\n    };\n  };\n  var updateHostElementName = React.useCallback(function (instance) {\n    var _instance$tagName;\n    setHostElementName((_instance$tagName = instance == null ? void 0 : instance.tagName) != null ? _instance$tagName : '');\n  }, []);\n  var handleRef = useForkRef(updateHostElementName, externalRef, focusVisibleRef, buttonRef);\n  var buttonProps = {};\n  if (hostElementName === 'BUTTON') {\n    buttonProps.type = type != null ? type : 'button';\n    if (focusableWhenDisabled) {\n      buttonProps['aria-disabled'] = disabled;\n    } else {\n      buttonProps.disabled = disabled;\n    }\n  } else if (hostElementName !== '') {\n    if (!href && !to) {\n      buttonProps.role = 'button';\n      buttonProps.tabIndex = tabIndex != null ? tabIndex : 0;\n    }\n    if (disabled) {\n      buttonProps['aria-disabled'] = disabled;\n      buttonProps.tabIndex = focusableWhenDisabled ? tabIndex != null ? tabIndex : 0 : -1;\n    }\n  }\n  var getRootProps = function getRootProps() {\n    var otherHandlers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    var propsEventHandlers = extractEventHandlers(parameters);\n    var externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers); // onFocusVisible can be present on the props, but since it's not a valid React event handler,\n    // it must not be forwarded to the inner component.\n\n    delete externalEventHandlers.onFocusVisible;\n    return _extends({\n      type: type\n    }, externalEventHandlers, buttonProps, {\n      onBlur: createHandleBlur(externalEventHandlers),\n      onClick: createHandleClick(externalEventHandlers),\n      onFocus: createHandleFocus(externalEventHandlers),\n      onKeyDown: createHandleKeyDown(externalEventHandlers),\n      onKeyUp: createHandleKeyUp(externalEventHandlers),\n      onMouseDown: createHandleMouseDown(externalEventHandlers),\n      onMouseLeave: createHandleMouseLeave(externalEventHandlers),\n      onMouseUp: createHandleMouseUp(externalEventHandlers),\n      ref: handleRef\n    });\n  };\n  return {\n    getRootProps: getRootProps,\n    focusVisible: focusVisible,\n    setFocusVisible: setFocusVisible,\n    disabled: disabled,\n    active: active\n  };\n}","map":{"version":3,"names":["_extends","React","unstable_useForkRef","useForkRef","unstable_useIsFocusVisible","useIsFocusVisible","extractEventHandlers","useButton","parameters","disabled","focusableWhenDisabled","href","externalRef","ref","tabIndex","to","type","buttonRef","useRef","useState","active","setActive","isFocusVisibleRef","handleFocusVisible","onFocus","handleBlurVisible","onBlur","focusVisibleRef","focusVisible","setFocusVisible","useEffect","current","hostElementName","setHostElementName","createHandleMouseLeave","otherHandlers","event","_otherHandlers$onMous","preventDefault","onMouseLeave","call","createHandleBlur","_otherHandlers$onBlur","createHandleFocus","_otherHandlers$onFocu2","currentTarget","_otherHandlers$onFocu","onFocusVisible","isNativeButton","button","includes","createHandleClick","_otherHandlers$onClic","onClick","createHandleMouseDown","_otherHandlers$onMous2","target","onMouseDown","createHandleMouseUp","_otherHandlers$onMous3","onMouseUp","createHandleKeyDown","_otherHandlers$onKeyD","onKeyDown","defaultPrevented","key","_otherHandlers$onClic2","createHandleKeyUp","_otherHandlers$onKeyU","onKeyUp","_otherHandlers$onClic3","updateHostElementName","useCallback","instance","_instance$tagName","tagName","handleRef","buttonProps","role","getRootProps","propsEventHandlers","externalEventHandlers"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@mui/base/ButtonUnstyled/useButton.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_useForkRef as useForkRef, unstable_useIsFocusVisible as useIsFocusVisible } from '@mui/utils';\nimport extractEventHandlers from '../utils/extractEventHandlers';\nexport default function useButton(parameters) {\n  const {\n    disabled = false,\n    focusableWhenDisabled,\n    href,\n    ref: externalRef,\n    tabIndex,\n    to,\n    type\n  } = parameters;\n  const buttonRef = React.useRef();\n  const [active, setActive] = React.useState(false);\n  const {\n    isFocusVisibleRef,\n    onFocus: handleFocusVisible,\n    onBlur: handleBlurVisible,\n    ref: focusVisibleRef\n  } = useIsFocusVisible();\n  const [focusVisible, setFocusVisible] = React.useState(false);\n\n  if (disabled && !focusableWhenDisabled && focusVisible) {\n    setFocusVisible(false);\n  }\n\n  React.useEffect(() => {\n    isFocusVisibleRef.current = focusVisible;\n  }, [focusVisible, isFocusVisibleRef]);\n  const [hostElementName, setHostElementName] = React.useState('');\n\n  const createHandleMouseLeave = otherHandlers => event => {\n    var _otherHandlers$onMous;\n\n    if (focusVisible) {\n      event.preventDefault();\n    }\n\n    (_otherHandlers$onMous = otherHandlers.onMouseLeave) == null ? void 0 : _otherHandlers$onMous.call(otherHandlers, event);\n  };\n\n  const createHandleBlur = otherHandlers => event => {\n    var _otherHandlers$onBlur;\n\n    handleBlurVisible(event);\n\n    if (isFocusVisibleRef.current === false) {\n      setFocusVisible(false);\n    }\n\n    (_otherHandlers$onBlur = otherHandlers.onBlur) == null ? void 0 : _otherHandlers$onBlur.call(otherHandlers, event);\n  };\n\n  const createHandleFocus = otherHandlers => event => {\n    var _otherHandlers$onFocu2;\n\n    // Fix for https://github.com/facebook/react/issues/7769\n    if (!buttonRef.current) {\n      buttonRef.current = event.currentTarget;\n    }\n\n    handleFocusVisible(event);\n\n    if (isFocusVisibleRef.current === true) {\n      var _otherHandlers$onFocu;\n\n      setFocusVisible(true);\n      (_otherHandlers$onFocu = otherHandlers.onFocusVisible) == null ? void 0 : _otherHandlers$onFocu.call(otherHandlers, event);\n    }\n\n    (_otherHandlers$onFocu2 = otherHandlers.onFocus) == null ? void 0 : _otherHandlers$onFocu2.call(otherHandlers, event);\n  };\n\n  const isNativeButton = () => {\n    const button = buttonRef.current;\n    return hostElementName === 'BUTTON' || hostElementName === 'INPUT' && ['button', 'submit', 'reset'].includes(button == null ? void 0 : button.type) || hostElementName === 'A' && (button == null ? void 0 : button.href);\n  };\n\n  const createHandleClick = otherHandlers => event => {\n    if (!disabled) {\n      var _otherHandlers$onClic;\n\n      (_otherHandlers$onClic = otherHandlers.onClick) == null ? void 0 : _otherHandlers$onClic.call(otherHandlers, event);\n    }\n  };\n\n  const createHandleMouseDown = otherHandlers => event => {\n    var _otherHandlers$onMous2;\n\n    if (event.target === event.currentTarget && !disabled) {\n      setActive(true);\n    }\n\n    (_otherHandlers$onMous2 = otherHandlers.onMouseDown) == null ? void 0 : _otherHandlers$onMous2.call(otherHandlers, event);\n  };\n\n  const createHandleMouseUp = otherHandlers => event => {\n    var _otherHandlers$onMous3;\n\n    if (event.target === event.currentTarget) {\n      setActive(false);\n    }\n\n    (_otherHandlers$onMous3 = otherHandlers.onMouseUp) == null ? void 0 : _otherHandlers$onMous3.call(otherHandlers, event);\n  };\n\n  const createHandleKeyDown = otherHandlers => event => {\n    var _otherHandlers$onKeyD;\n\n    (_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null ? void 0 : _otherHandlers$onKeyD.call(otherHandlers, event);\n\n    if (event.defaultPrevented) {\n      return;\n    }\n\n    if (event.target === event.currentTarget && !isNativeButton() && event.key === ' ') {\n      event.preventDefault();\n    }\n\n    if (event.target === event.currentTarget && event.key === ' ' && !disabled) {\n      setActive(true);\n    } // Keyboard accessibility for non interactive elements\n\n\n    if (event.target === event.currentTarget && !isNativeButton() && event.key === 'Enter' && !disabled) {\n      var _otherHandlers$onClic2;\n\n      (_otherHandlers$onClic2 = otherHandlers.onClick) == null ? void 0 : _otherHandlers$onClic2.call(otherHandlers, event);\n      event.preventDefault();\n    }\n  };\n\n  const createHandleKeyUp = otherHandlers => event => {\n    var _otherHandlers$onKeyU;\n\n    // calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed\n    // https://codesandbox.io/s/button-keyup-preventdefault-dn7f0\n    if (event.target === event.currentTarget) {\n      setActive(false);\n    }\n\n    (_otherHandlers$onKeyU = otherHandlers.onKeyUp) == null ? void 0 : _otherHandlers$onKeyU.call(otherHandlers, event); // Keyboard accessibility for non interactive elements\n\n    if (event.target === event.currentTarget && !isNativeButton() && !disabled && event.key === ' ' && !event.defaultPrevented) {\n      var _otherHandlers$onClic3;\n\n      (_otherHandlers$onClic3 = otherHandlers.onClick) == null ? void 0 : _otherHandlers$onClic3.call(otherHandlers, event);\n    }\n  };\n\n  const updateHostElementName = React.useCallback(instance => {\n    var _instance$tagName;\n\n    setHostElementName((_instance$tagName = instance == null ? void 0 : instance.tagName) != null ? _instance$tagName : '');\n  }, []);\n  const handleRef = useForkRef(updateHostElementName, externalRef, focusVisibleRef, buttonRef);\n  const buttonProps = {};\n\n  if (hostElementName === 'BUTTON') {\n    buttonProps.type = type != null ? type : 'button';\n\n    if (focusableWhenDisabled) {\n      buttonProps['aria-disabled'] = disabled;\n    } else {\n      buttonProps.disabled = disabled;\n    }\n  } else if (hostElementName !== '') {\n    if (!href && !to) {\n      buttonProps.role = 'button';\n      buttonProps.tabIndex = tabIndex != null ? tabIndex : 0;\n    }\n\n    if (disabled) {\n      buttonProps['aria-disabled'] = disabled;\n      buttonProps.tabIndex = focusableWhenDisabled ? tabIndex != null ? tabIndex : 0 : -1;\n    }\n  }\n\n  const getRootProps = (otherHandlers = {}) => {\n    const propsEventHandlers = extractEventHandlers(parameters);\n\n    const externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers); // onFocusVisible can be present on the props, but since it's not a valid React event handler,\n    // it must not be forwarded to the inner component.\n\n\n    delete externalEventHandlers.onFocusVisible;\n    return _extends({\n      type\n    }, externalEventHandlers, buttonProps, {\n      onBlur: createHandleBlur(externalEventHandlers),\n      onClick: createHandleClick(externalEventHandlers),\n      onFocus: createHandleFocus(externalEventHandlers),\n      onKeyDown: createHandleKeyDown(externalEventHandlers),\n      onKeyUp: createHandleKeyUp(externalEventHandlers),\n      onMouseDown: createHandleMouseDown(externalEventHandlers),\n      onMouseLeave: createHandleMouseLeave(externalEventHandlers),\n      onMouseUp: createHandleMouseUp(externalEventHandlers),\n      ref: handleRef\n    });\n  };\n\n  return {\n    getRootProps,\n    focusVisible,\n    setFocusVisible,\n    disabled,\n    active\n  };\n}"],"mappings":";AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,mBAAmB,IAAIC,UAAU,EAAEC,0BAA0B,IAAIC,iBAAiB,QAAQ,YAAY;AAC/G,OAAOC,oBAAoB,MAAM,+BAA+B;AAChE,eAAe,SAASC,SAAS,CAACC,UAAU,EAAE;EAC5C,2BAQIA,UAAU,CAPZC,QAAQ;IAARA,QAAQ,qCAAG,KAAK;IAChBC,qBAAqB,GAMnBF,UAAU,CANZE,qB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